#include "uart_app.h"

uint8_t rx_dat[30];
uint8_t rx_finish_flag = 0;

void UART_proc(void)
{
    if(rx_finish_flag == 1)
    {
        if(rx_dat[0] == 'R' && rx_dat[1] == '3' && rx_dat[2] == '7' )
        {
            printf("R37:%d,%d,%.1f%%\n",PR37_count[1],PR37_count[0],PR37_value);
        }
        else if(rx_dat[0] == 'R' && rx_dat[1] == '3' && rx_dat[2] == '8' )
        {
        printf("R38:%d,%d,%.1f%%\n",PR38_count[1],PR38_count[0],PR38_value);
        }
        rx_finish_flag = 0;
    }

}


void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
    rx_finish_flag = 1;
}
